package com.lglbc.single;

import com.lglbc.hello.Mode;
import com.lglbc.hello.OpenAPIGrpc;
import io.grpc.stub.StreamObserver;

public class Service extends OpenAPIGrpc.OpenAPIImplBase {
    @Override
    public void singleRequest(Mode.Request request, StreamObserver<Mode.Response> responseObserver) {
        Mode.Response response = Mode.Response.newBuilder()
                .setMessage("你好 "+request.getName()+ "，单一请求")
                .build();
        responseObserver.onNext(response);
        responseObserver.onCompleted();
    }
}
